package com.qf.data.course.entity;

import lombok.Data;
import lombok.experimental.Accessors;

import java.util.ArrayList;
import java.util.List;

/**
 * 树形结构的节点类
 * author Ken
 * create_time 2022/9/22
 */
@Data
@Accessors(chain = true)
public class CourseTypeTreeNode {

    private Integer id;
    private String label;
    private Integer level;
    private List<CourseTypeTreeNode> children = new ArrayList<>();

    public CourseTypeTreeNode addNode(CourseTypeTreeNode node){
        children.add(node);
        return this;
    }
}